Component({
  properties: {
    list: {
      type: Array,
      value: []
    },
    // 轮播图的高度
    height: {
      type: String,
      value: '320rpx'
    }
  },
  data: {
    currentIndex: 0
  },
  methods: {

    /**
     * swiper滚动
     */
    onSwiperChange(e) {
      this.setData({
        currentIndex: e.detail.current
      })
    },

    /**
     * item点击事件
     */
    onItemTap(e) {
      let dataset = e.currentTarget.dataset
      this.triggerEvent('onItemTap', dataset)
    },
  }
});